#!/bin/bash

if [[ $EUID -ne 0 ]]; then
  echo "you should be root..."
  exit
fi

if [ $# == 0 ]; then
  N=1
else
  N=$1
fi

if [ -f ./result.ko ]; then
  for((i=0;i<$N;++i)); do
    insmod ./result.ko
    rmmod result
  done
  log
else
  echo "no file result.ko here..."
fi
